package com.xuyn.framework.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @ Program     : xuyn
 * @ Description : 读取项目相关配置信息
 * @ Author      : Emason
 * @ Create      : 2019-09-19 14:22
 * @ Since       : 1.0
 **/
@Data
@Component
@ConfigurationProperties(prefix = "xuyn")
public class XuYnConfig {

    /** 项目名称 */
    private String name;
    /** 版本 */
    private String version;
    /** 版权年份 */
    private String copyrightYear;
    /** 上传路径 */
    private static String profile;
    /** 获取地址开关 */
    private static boolean addressEnabled;

    public static String getAvatarPath()
    {
        return profile + "avatar/";
    }

    public static String getDownloadPath()
    {
        return profile + "download/";
    }

    public static String getUploadPath()
    {
        return profile + "upload/";
    }
}
